Public: Technology Reviews : Local Webstart Install of Versioned jars
This page last changed on Jul 24, 2008 by stepheneb.
These instructions provide a way to install jars into the jnlp cache from a local server. SAIL Dashboard scriptsUDL SAIL Dashboard MacOS disk image archive.I've created a disk image that has the MacOS shell scripts and Java Web Start resources that can be used to manually install all the Java Web Start resources used for the UDL activities. Here's a copy of the script: /home/sbannasch/scripts/sds-empty I use to create an empty sail dashboard dmg on the server seymour and copy it to http://rails.dev.concord.org #!/bin/bash rm -rf sd mkdir sd cd sd svn export https://svn.concord.org/svn/projects/trunk/common/java/deploy/sail-dashboard echo '' > sail-dashboard/commands/jnlps.txt cd - /home/sbannasch/bin/make_dmg sd sail-dashboard-empty.dmg "SAILDashboard" scp sail-dashboard-empty.dmg sbannasch@otto.concord.org:~/rails Here's a copy of the make_dmg script it calls: #!/bin/bash # # make_dmg # # make hfsplus disk image from directory # # sudo make_dmg <dir_path> <dmg_nameg> [volume_label] # if [ -z "$SUDO_COMMAND" ] # Need to run this with sudo then mntusr=$(id -u) grpusr=$(id -g) sudo $0 $* exit 0 fi if [ -d "$1" ] # dir_path then dir_path=$1 else echo "Must pass in valid dir" exit fi if [ -n "$2" ] # dmg_name then dmg_name=$2 else echo "Must pass name for dmg" exit fi if [ -n "$3" ] # volume_label. then volume_label=$3 else volume_label="Untitled" echo echo "Using volume_label=Untitled" echo fi du_output=`du -sk $dir_path 2>&1` dir_size=`echo $du_output | cut -f1 -d" "` dir_size=`expr $dir_size + 1000` dd if=/dev/zero of=$dmg_name bs=1024 count=$dir_size /sbin/mkfs.hfsplus -v "$volume_label" $dmg_name mount -o loop -t hfsplus ./$dmg_name /mnt/tmp/ cp -r $dir_path/* /mnt/tmp umount /mnt/tmp Here's a pdf of the the initial user documentation for UDL Teachers UsingSailDashboard_v1.1.pdf. This disk image is an empty SAIL Dashboard with the two jnlps used by the current UDL project in the file: commands/jnlps.txt. The disk image only 5MB, so after downloading you will need to run this command:
to fill the SAIL Dashboard cache with the web start resources for the jnlps listed in the file commands/jnlps.txt. After you download it the SAIL Dashboard volume should mount. Contained in the SAIL Dashboard volume is a folder called: sail-dashboard Copy that to a USB stick or a portable hard drive and fill the SAIL Dashboard cache with the remote Java Web Start resources with this command:
Then mount the portable drive on any MacOS computer that needs the UDL Java Web Start resources installed and then double click this script file in the sail-dashboard folder:
FYI (background info): These are the jnlps whose jars the sail-dashboard-udl.dmg will be populated with: http://jnlp.concord.org/dev/org/concord/maven-jnlp/udl-otrunk/udl-otrunk-0.1.0-20080507.121247.jnlp http://jnlp.concord.org/dev/mozswing/mozswing.jnlp Empty SAIL Dashboard MacOS disk image archive.There is also an empty sail-dashboard.dmg (only 3.5MB) located here: Right now this only works on Macs ... the scripts could certainly be adapted for Windows however. Download it, copy the sail-dashboard folder to another volume and add one or more jnlp urls in the file: sail-dashboard/commands/jnlps.txt. With a TELS Jnlp url then you could use this script to install into the SAIL Dashboard cache the jnlp resources for a TELS run:
Copy the sail-dashboard folder to a portable hard drive or a USB stick and it can be used to preload the TELS jars onto classroom computers that don't already have the jars. SAIL Dashboard Code Resources:
We are using the script listed here: Creating MacOS dmg files in Linux to script the production of MacOS dmg files on our Linux servers. Creating MacOS Disk Images:The MacOS command line utility: hdutils can be used in a shell script to create a MacOS Disk Image of the sail-dashboard folder. In order for a MacOS disk image to mount with the sail-dashboard folder appearing in the mounted volume a copy of the sail-dashboard folder should be place inside another folder. Creating an empty SAIL Dashboard Disk Image
mkdir sd
cd sd
svn export https://svn.concord.org/svn/projects/trunk/common/java/deploy/sail-dashboard
cd -
hdiutil create -srcfolder sd -fs HFS+ -volname SAIL\ Dashboard sail-dashboard-empty.dmg
Creating a SAIL Dashboard Disk Image with the Jetty jnlp servlet cache pre-filled.After completing a svn export of sail-dashboard code edit the file: sail-dashboard/commands/jnlp.txt to include the Jnlp url(s) you would like the SAIL Dashboard to cache. cd sd/sail-dashboard ./update_cached_resources_from_remote_servers.command cd - hdiutil create -srcfolder sd -fs HFS+ -volname SAIL\ Dashboard sail-dashboard.dmg SAIL Dashboard READMEREADME These scripts can be used to pre-load the Java Web Start jar files for a Jnlp into a local users Java Web Start cache. The folder containing these scripts and cached Jar files can be copied to a USB Flash memory stick or a portable hard drive and moved from computer to computer in a classroom to quickly preload the Java Web Start cache for the local user on each computer. Currently these scripts only work on MacOS X The file: commands/jnlps.txt, has a list of all the Java Web Start Jnlps that will be cached locally by the SAIL Dashboard. These are normally copies of the Jnlp urls used by the SAIL Data Service. How to use the SAIL Dashboard Scripts:
Initial Design WorkThe procedure would go like this:
This process uses the "-import" option built into javaws. That is documented here Install Empty Jnlp Servercurl http://confluence.concord.org/download/attachments/15581/jetty-6.1.9-stripped.zip | jar x mkdir jetty-6.1.9-stripped/webapps/jnlp cd jetty-6.1.9-stripped/webapps/jnlp curl http://confluence.concord.org/download/attachments/11547/empty-jnlp-servlet.war | jar x cd - Update Jars and Jnlps in Jnlp Servercurl http://jnlp.concord.org/dev/org/concord/jnlp2shell/jnlp2shell-1.0-SNAPSHOT.jar > jnlp2shell.jar SERVLET_JNLPS=" http://jnlp.concord.org/dev/org/concord/maven-jnlp/udl-otrunk/udl-otrunk.jnlp http://jnlp.concord.org/dev/org/concord/maven-jnlp/capa-otrunk/capa-otrunk.jnlp" for jnlp_url in $SERVLET_JNLPS do java -Dgenerate.import.jnlps=true -cp jnlp2shell.jar org.concord.JnlpServletCacher $jnlp_url jetty-6.1.9-stripped/webapps/jnlp done this is a slightly modified version of the script on Setup Local Jnlp Server. The difference is the "-Dgenerate.import.jnlps=true". Install/Import Jars into Webstart CacheStart the servercd jetty-6.1.9-stripped java -jar start.jar etc/jetty.xml Have javaws do the import
javaws -codebase [local codebase] -import [url to local jnlp file]
The best way to figure out the appropriate codebase is to look at the jnlp file you are trying to import. Then replace [host]:[port]/[context] with localhost:8080/jnlp Examples
javaws -codebase http://localhost:8080/jnlp -import http://localhost:8080/jnlp/org/concord/maven-jnlp/udl-otrunk/udl-otrunk.jnlp
javaws -codebase http://localhost:8080/jnlp/mozswing -import http://localhost:8080/jnlp/mozswing/mozswing.jnlp
Stop the servertype ctrl-c
UsingSailDashboard_v1.1.pdf (application/pdf)
|
Document generated by Confluence on Jan 27, 2014 16:56 |